package top.kaoshanji.p2ch10a.support;

/**
 * author kaoshanji
 * ^_^
 * create time 2025/2/2 20:16
 */
public class Counter implements Cloneable {

    private int value = 0;

    public void increase() {
        value++;
    }

    public int getValue() {
        return value;
    }

    @Override
    public Object clone() {
        try {
            return super.clone();
        } catch (CloneNotSupportedException e) {
            throw new Error(e);
        }
    }
}
